From: Florian Müllner Date: Wed, 17 Feb 2021 08:54:14 +0000 (+0100) Subject: workspaceThumbnails: Delay workspace removal while collapsing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~280 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7b1b04f95aeb15a7edf3e1ea00b9a3b097c1bc1d;p=gnome-shell.git workspaceThumbnails: Delay workspace removal while collapsing Animating a thumbnail removal while also collapsing the minimap itself doesn't look good, so keep the stale thumbnail until the minimap is hidden. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3739 Part-of: --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index b06e60209..03e97f175 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -691,6 +691,11 @@ var ThumbnailsBox = GObject.registerClass({ global.display.connect('workareas-changed', this._updatePorthole.bind(this)); + this.connect('notify::visible', () => { + if (!this.visible) + this._queueUpdateStates(); + }); + this._switchWorkspaceNotifyId = 0; this._nWorkspacesNotifyId = 0; this._syncStackingId = 0; @@ -1122,6 +1127,10 @@ var ThumbnailsBox = GObject.registerClass({ if (this._animatingIndicator) return; + // Likewise if we are in the process of hiding + if (!this._shouldShow && this.visible) + return; + // Then slide out any thumbnails that have been destroyed this._iterateStateThumbnails(ThumbnailState.REMOVING, thumbnail => { this._setThumbnailState(thumbnail, ThumbnailState.ANIMATING_OUT);